package com.tanhua.server.controller;

import com.tanhua.server.service.TodayBestService;
import com.tanhua.vo.PageResult;
import com.tanhua.vo.RecommendUserQueryParam;
import com.tanhua.vo.TodayBestVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
<<<<<<< HEAD
=======
import org.springframework.web.bind.annotation.PathVariable;
>>>>>>> acc7004 (第4天到第8天)
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @author： xtr
 * @date： 2021-03-09 19:53
 */
@RestController
@RequestMapping("/tanhua")
public class TodayBestController {

    @Autowired
    private TodayBestService todayBestService;

    @GetMapping("/todayBest")
    public ResponseEntity TodayBest(){
<<<<<<< HEAD
        TodayBestVo todayBestVo = todayBestService.todayBest();
=======
        TodayBestVo todayBestVo = todayBestService.queryTodayBest();
>>>>>>> acc7004 (第4天到第8天)
        return ResponseEntity.ok(todayBestVo);
    }

    @GetMapping("/recommendation")
<<<<<<< HEAD
    public ResponseEntity recommendList(RecommendUserQueryParam recommendUserQueryParam){
        PageResult<TodayBestVo> pageResult = todayBestService.recommendList(recommendUserQueryParam);
        return ResponseEntity.ok(pageResult);
    }
=======
    public ResponseEntity recommendList(RecommendUserQueryParam queryParam){
        PageResult<TodayBestVo> pageResult = todayBestService.recommendList(queryParam);
        return ResponseEntity.ok(pageResult);
    }

    @GetMapping("/{id}/personalInfo")
    public ResponseEntity personalInfo(@PathVariable("id") Long id){
        TodayBestVo todayBestVo = todayBestService.personalInfo(id);
        return ResponseEntity.ok(todayBestVo);
    }
>>>>>>> acc7004 (第4天到第8天)
}
